<?php 
$content = "";
if($_GET['url']){
  $content = curl($_GET['url']);
}else{
	echo '请加上地址';
}
if(preg_match('|var shareInfo = (.*)\;|',$content,$ar)){
  $content = json_decode($ar[1]);
  // var_dump($content);
  $uin = $content->uin;
  $dl_svr_host = $content->dl_svr_host;
      $dl_svr_port = $content->dl_svr_port ;
      $file_name = $content->file_name;
      $dl_encrypt_url = $content->dl_encrypt_url;
  $value = 'http://'.$dl_svr_host.':'.$dl_svr_port.'/ftn_handler/'.$dl_encrypt_url.'/?fname='.$filename;
  header("location:$value");
}
//echo curl($_GET['url']);
function curl($url) {
                $ch = curl_init();
                curl_setopt ($ch, CURLOPT_URL, $url);
                curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 11);
                curl_setopt($ch, CURLOPT_USERAGENT,  $_SERVER['HTTP_USER_AGENT']);
                $data = curl_exec($ch);
                curl_close($ch);
                 return $data;
}
?>